package com.juncdut.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.client.discovery.DiscoveryClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/system")
public class HelloController {

    @Autowired
    private DiscoveryClient client;
    @Value("${server.port}")
    private String port;

    @GetMapping("/hello")
    public String Hello(){
        System.out.println("你好");
        return "Hello world 你好，世界-----port: "+port;
    }
}
